home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / powerd / lib / powerd.lha / powerd_ppc / AllocVecPooled.ass < prev    next >
Encoding:
Text File  |  1980-03-26  |  630 b   |  37 lines

  1.  
  2. # AllocVecPooled(pool:r3:PTR,size:r4:LONG)(PTR)
  3.  
  4.     .text
  5.     .global    _AllocVecPooled
  6.     .global    _AllocVecPooledPPC
  7.  
  8. _AllocVecPooledPPC:
  9. _AllocVecPooled:
  10.     mflr    r0
  11.     stw    r0,8(r1)
  12.     stwu    r1,-32(r1)
  13.     stw    r4,24(r1)
  14.     mr    r5,r4
  15.     addi    r5,r5,4        # add the SIZEOF_LONG
  16.     mr    r4,r3
  17.     lwz    r3,_PowerPCBase(r2)
  18.     lwz    r0,-828+2(r3)
  19.     mtlr    r0
  20.     blrl
  21.  
  22.     lwz    r4,24(r1)
  23.     stw    r4,0(r3)
  24.     addi    r3,r3,4        # store the size and return the position
  25.  
  26.     addi    r1,r1,32
  27.     lwz    r0,8(r1)
  28.     mtlr    r0
  29.     blr
  30.  
  31.     .type    _AllocVecPooled,@function
  32.     .size    _AllocVecPooled,$-_AllocVecPooled
  33.     .type    _AllocVecPooledPPC,@function
  34.     .size    _AllocVecPooledPPC,$-_AllocVecPooledPPC
  35.  
  36.     .extern    _PowerPCBase
  37.